package com.ruoyi.tiktok.service;

import com.ruoyi.tiktok.domain.TaskVideoRelation;
import com.ruoyi.tiktok.mapper.TaskVideoRelationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TaskVideoRelationService {
    @Autowired
    private TaskVideoRelationMapper relationMapper;

    public void createRelation(TaskVideoRelation relation) {
        relationMapper.insertRelation(relation);
    }

    public void deleteRelationById(int id) {
        relationMapper.deleteRelationById(id);
    }

    public TaskVideoRelation getRelation(String taskId, String videoId) {
        return relationMapper.getRelation(taskId, videoId);
    }

    public List<TaskVideoRelation> getRelationsByTaskId(String taskId) {
        return relationMapper.getRelationsByTaskId(taskId);
    }
}

